using UnityEngine;

namespace NodeCanvas.BehaviourTrees
{
	[AddComponentMenu("")]
	public abstract class BTDecorator : BTNodeBase
	{
		public override int maxOutConnections
		{
			get
			{
				return 1;
			}
		}

		public override int maxInConnections
		{
			get
			{
				return 1;
			}
		}

		protected Connection decoratedConnection
		{
			get
			{
				if (base.outConnections.Count != 0)
				{
					return base.outConnections[0];
				}
				return null;
			}
		}

		protected Node decoratedNode
		{
			get
			{
				if (base.outConnections.Count != 0)
				{
					return base.outConnections[0].targetNode;
				}
				return null;
			}
		}
	}
}
